#include "catch.hpp"
#include "ACEtk.hpp"

using namespace njoy::ACEtk;

extern Table::Data data;

std::string reference();

SCENARIO("print"){
  const auto& cdata = data; 
  std::ostringstream oss;
  data.print( oss );
  REQUIRE( oss.str() == reference() );
}

std::string reference(){
  return
    "      0  0.0000000      0  0.0000000      0  0.0000000      0  0.0000000\n"
    "      0  0.0000000      0  0.0000000      0  0.0000000      0  0.0000000\n"
    "      0  0.0000000      0  0.0000000      0  0.0000000      0  0.0000000\n"
    "      0  0.0000000      0  0.0000000      0  0.0000000      0  0.0000000\n"
    "       84    33074     1595      132       46      814        2        0\n"
    "        0        0        0        0        0        0        0        9\n"
    "        1   788721   788768   788815   788862   788909   788956  1270743\n"
    "  1270789  1363882  1363927  1475750  1633494  1633500  1633506  1634036\n"
    "  1634042  1634042  1634048  1637218   789147  1637220  1464171  1465923\n"
    "  1465934  1465976  1465982        0        0        0        0        8\n"
    "  1.000000000000E-11  1.031250000000E-11  1.062500000000E-11  1.093750000000E-11\n"
    "  1.125000000000E-11  1.156250000000E-11  1.187500000000E-11  1.218750000000E-11\n"
    "  1.250000000000E-11  1.281250000000E-11  1.312500000000E-11  1.343750000000E-11\n"
    "  1.375000000000E-11  1.437500000000E-11  1.500000000000E-11  1.562500000000E-11\n"
    "  1.625000000000E-11  1.687500000000E-11  1.750000000000E-11  1.812500000000E-11\n"
    "  1.875000000000E-11  1.937500000000E-11  2.000000000000E-11  2.093750000000E-11\n"
    "  2.187500000000E-11  2.281250000000E-11  2.375000000000E-11  2.468750000000E-11\n"
    "  2.562500000000E-11  2.656250000000E-11  2.750000000000E-11  2.843750000000E-11\n"
    "  2.937500000000E-11  3.031250000000E-11  3.125000000000E-11  3.218750000000E-11\n"
    "  3.312500000000E-11  3.406250000000E-11  3.500000000000E-11  3.593750000000E-11\n"
    "  3.687500000000E-11  3.781250000000E-11  3.875000000000E-11  3.968750000000E-11\n"
    "  4.062500000000E-11  4.250000000000E-11  4.437500000000E-11  4.625000000000E-11\n"
    "  4.812500000000E-11  5.000000000000E-11  5.156250000000E-11  5.312500000000E-11\n"
    "  5.468750000000E-11  5.625000000000E-11  5.781250000000E-11  5.937500000000E-11\n"
    "  6.093750000000E-11  6.250000000000E-11  6.406250000000E-11  6.562500000000E-11\n"
    "  6.718750000000E-11  6.875000000000E-11  7.187500000000E-11  7.500000000000E-11\n"
    "  7.812500000000E-11  8.125000000000E-11  8.437500000000E-11  8.750000000000E-11\n"
    "  9.062500000000E-11  9.375000000000E-11  9.687500000000E-11  1.000000000000E-10\n"
    "  1.031250000000E-10  1.062500000000E-10  1.093750000000E-10  1.125000000000E-10\n"
    "  1.156250000000E-10  1.187500000000E-10  1.218750000000E-10  1.250000000000E-10\n"
    "  1.281250000000E-10  1.312500000000E-10  1.343750000000E-10  1.375000000000E-10\n";
}
